<template>
	<view class="Recommend">
		<view class="team-top">
			<view class="img">
				<image class="headerImg" src="../../static/img/Home2.png"></image>
			</view>
			<view class="bottom">
				<view>会员等级：{{userinfo.level}}级</view>
				<view>管理分：{{userinfo.leader_score}}</view>
				<view>团队人数：{{userinfo.team_num}}</view>
			</view>
		</view>
		<view class="team-list">
			<view class="title">
				<text class="icon"></text>
				<text class="tit">管理分规则</text>
				<text @click="golink('../Recommend/details')" class="details">管理分详情</text>
			</view>
			<view class="info">

				<text>1、分为（0-100 分），每个账号初始分为 0.</text>
				<text>2、管理分只针对等级3用户，1级和2级用户不参与管理分功能.</text>
				<text>3、等级3用户每天自动扣减1分.</text>
				<text>4、伞下团队每增加1人，管理分增加1分（需有效排单打款).</text>
				<text>5、伞下有成员10天不排单，所有上级扣5分.</text>
				<text>6、管理分为0分时，不能提现.</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				userinfo: ''
			};
		},
		onLoad() {
			this.getData();

		},
		methods: {
			getData: function(type) {
				const _this = this;
				//获取用户信息
				this.$request.get("/api/user/getUserInfo", {})
					.then(res => {
						if (res.data.code == 1) {
							_this.userinfo = res.data.data.user;
						}
					})
					.catch(error => {
						console.error('error:', error);
					});
			},
			golink(link) {
				// 跳转到其他页面
				uni.navigateTo({
					url: link
				})
			},
		}
	}
</script>

<style lang="less">
	.Recommend {
		background-color: #F1F1F1;
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;

		.team-top {
			width: 96%;
			height: 120px;
			background-color: #FFFFFF;
			display: flex;
			flex-direction: column;
			align-items: center;
			justify-content: space-around;
			border-top: 5px solid #F1F1F1;
			border-bottom: 10px solid #F1F1F1;
			font-size: 14px;
			color: #24435D;

			.img {
				flex: 1;
				display: flex;
				align-items: center;

				.headerImg {
					width: 120upx;
					height: 120upx;
				}
			}

			.bottom {
				height: 40px;
				width: 100%;
				display: flex;
				flex-direction: row;
				align-items: center;
				justify-content: space-around;
			}
		}

		.team-list {
			width: 96%;
			background-color: #FFFFFF;
			flex: 1;
			font-size: 12px;
			color: #24435D;

			.title {
				display: flex;
				height: 50px;
				align-items: center;

				.icon {
					width: 6px;
					height: 30px;
					background: rgba(39, 146, 229, 1);

				}

				.tit {
					font-size: 22px;
					flex: 1;
					padding-left: 16px;
				}

				.details {
					padding-right: 16px;
					color: #1D7BFF;
				}
			}

			.info {
				display: flex;
				flex-direction: column;
				line-height: 60upx;
				padding-left: 22px;
				padding-right: 10px;
				font-size: 12px;

				.zt {
					line-height: 60px;

				}
			}
		}
	}
</style>
